- Author:
- Weiwei Ai <wai484@aucklanduni.ac.nz>
- Date:
- 2024-04-06 11:32:22+13:00
- Desc:
- correct the units; Add the model with the parameters converted from kinetic models
- Permanent Source URI:
- http://models.cellml.org/workspace/b65/rawfile/cc67d4f5117e49e550b0fed51e40854609d05eae/Facilitated transporter/CellMLV2/GLUT1_BG.py
# The content of this file was generated using the Python profile of libCellML 0.5.0.
from enum import Enum
from math import *
__version__ = "0.4.0"
LIBCELLML_VERSION = "0.5.0"
STATE_COUNT = 4
VARIABLE_COUNT = 56
class VariableType(Enum):
VARIABLE_OF_INTEGRATION = 0
STATE = 1
CONSTANT = 2
COMPUTED_CONSTANT = 3
ALGEBRAIC = 4
VOI_INFO = {"name": "t", "units": "second", "component": "GLUT1_BG", "type": VariableType.VARIABLE_OF_INTEGRATION}
STATE_INFO = [
{"name": "q_1", "units": "fmol", "component": "GLUT1_BG", "type": VariableType.STATE},
{"name": "q_2", "units": "fmol", "component": "GLUT1_BG", "type": VariableType.STATE},
{"name": "q_3", "units": "fmol", "component": "GLUT1_BG", "type": VariableType.STATE},
{"name": "q_4", "units": "fmol", "component": "GLUT1_BG", "type": VariableType.STATE}
]
VARIABLE_INFO = [
{"name": "K_2", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "K_3", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "c", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "d", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_4", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "K_1", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "h", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "g", "units": "per_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Ao", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "a", "units": "per_fmol_s", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "b", "units": "per_s", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "K_Ai", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r1", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r2", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r3", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "kappa_r4", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "E", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "GC", "units": "uM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_i", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_Ao", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "g_o", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_o", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_Ai", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "g_i", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "R", "units": "J_per_K_mol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "T", "units": "kelvin", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_1", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_2", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_3", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_4", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "mu_Ai", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "q_Ai", "units": "fmol", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "mu_Ao", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "q_Ao", "units": "fmol", "component": "GLUT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "mu_1", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_1", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "mu_2", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_2", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "mu_3", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_3", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "mu_4", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_4", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_r1", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_f_r1", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_r_r1", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_r2", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_f_r2", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_r_r2", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_r3", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_f_r3", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_r_r3", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_r4", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_f_r4", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A_r_r4", "units": "J_per_mol", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_Ai", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_Ao", "units": "fmol_per_s", "component": "GLUT1_BG", "type": VariableType.ALGEBRAIC}
]
def create_states_array():
return [nan]*STATE_COUNT
def create_variables_array():
return [nan]*VARIABLE_COUNT
def initialise_variables(states, rates, variables):
variables[1] = 1.0e-5
variables[2] = 1113.0
variables[3] = 90.3
variables[5] = 1.0e-6
variables[6] = 0.726
variables[7] = 12.1
variables[9] = 1000.0
variables[17] = 6.67
variables[18] = 90.0
variables[20] = 1.0e-8
variables[21] = 90.0
variables[23] = 10.0
variables[24] = 8.31
variables[25] = 273.15
variables[26] = 0.1501
variables[27] = 0.1501
variables[28] = 0.1501
variables[29] = 0.1501
states[0] = variables[26]
states[1] = variables[27]
states[2] = variables[28]
states[3] = variables[29]
def compute_computed_constants(variables):
variables[0] = variables[1]*variables[2]/variables[3]
variables[4] = variables[5]*variables[6]/variables[7]
variables[8] = variables[0]/variables[5]*variables[9]/variables[10]
variables[10] = 9.5*variables[9]
variables[11] = variables[8]
variables[12] = variables[6]/variables[4]
variables[13] = variables[2]/variables[0]
variables[14] = variables[10]/variables[0]
variables[15] = 1.0*variables[14]
variables[16] = variables[17]*variables[18]*1.0/1000.0
variables[19] = variables[20]*variables[21]
variables[22] = variables[23]*variables[18]
variables[30] = variables[24]*variables[25]*log(variables[11]*variables[31])
variables[31] = variables[22]
variables[32] = variables[24]*variables[25]*log(variables[8]*variables[33])
variables[33] = variables[19]
def compute_rates(voi, states, rates, variables):
variables[40] = variables[24]*variables[25]*log(variables[4]*states[3])
variables[43] = variables[40]
variables[34] = variables[24]*variables[25]*log(variables[5]*states[0])
variables[44] = variables[34]
variables[42] = variables[12]*(exp(variables[43]/(variables[24]*variables[25]))-exp(variables[44]/(variables[24]*variables[25])))
variables[36] = variables[24]*variables[25]*log(variables[0]*states[1])
variables[50] = variables[36]
variables[49] = variables[32]+variables[34]
variables[48] = variables[14]*(exp(variables[49]/(variables[24]*variables[25]))-exp(variables[50]/(variables[24]*variables[25])))
variables[35] = variables[42]-variables[48]
rates[0] = variables[35]
variables[46] = variables[36]
variables[38] = variables[24]*variables[25]*log(variables[1]*states[2])
variables[47] = variables[38]
variables[45] = variables[13]*(exp(variables[46]/(variables[24]*variables[25]))-exp(variables[47]/(variables[24]*variables[25])))
variables[37] = variables[48]-variables[45]
rates[1] = variables[37]
variables[52] = variables[38]
variables[53] = variables[30]+variables[40]
variables[51] = variables[15]*(exp(variables[52]/(variables[24]*variables[25]))-exp(variables[53]/(variables[24]*variables[25])))
variables[39] = variables[45]-variables[51]
rates[2] = variables[39]
variables[41] = variables[51]-variables[42]
rates[3] = variables[41]
def compute_variables(voi, states, rates, variables):
variables[34] = variables[24]*variables[25]*log(variables[5]*states[0])
variables[36] = variables[24]*variables[25]*log(variables[0]*states[1])
variables[38] = variables[24]*variables[25]*log(variables[1]*states[2])
variables[40] = variables[24]*variables[25]*log(variables[4]*states[3])
variables[43] = variables[40]
variables[44] = variables[34]
variables[42] = variables[12]*(exp(variables[43]/(variables[24]*variables[25]))-exp(variables[44]/(variables[24]*variables[25])))
variables[46] = variables[36]
variables[47] = variables[38]
variables[45] = variables[13]*(exp(variables[46]/(variables[24]*variables[25]))-exp(variables[47]/(variables[24]*variables[25])))
variables[50] = variables[36]
variables[49] = variables[32]+variables[34]
variables[48] = variables[14]*(exp(variables[49]/(variables[24]*variables[25]))-exp(variables[50]/(variables[24]*variables[25])))
variables[52] = variables[38]
variables[53] = variables[30]+variables[40]
variables[51] = variables[15]*(exp(variables[52]/(variables[24]*variables[25]))-exp(variables[53]/(variables[24]*variables[25])))
variables[54] = variables[51]
variables[55] = -variables[48]
variables[35] = variables[42]-variables[48]
variables[37] = variables[48]-variables[45]
variables[39] = variables[45]-variables[51]
variables[41] = variables[51]-variables[42]